package com.dingwen.treasure.task.quartz.job;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;

import java.util.concurrent.TimeUnit;

/**
 * 　TestJob </br>
 *  <p> Quartz禁止并发执行 DisallowConcurrentExecution</p>
 * 　@author dingwen
 * 　@date 2022/5/11
 */
@Slf4j
@DisallowConcurrentExecution
public class TestJob extends AbstractJob {
    /**
     * 精确执行
     */
    @SneakyThrows(Throwable.class)
    @Override
    protected void exactExecution() {
        TimeUnit.SECONDS.sleep(5);
        log.info("TestJob execute ...");
    }
}
